package BookManage;

import BookManage.Operation.IOperation;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 强仔
 * Date: 2022-01-16
 * Time: 10:32
 */
//君子协定:User不能创建实例    抽象类，不能创建实例
abstract public class User {
    private int userId;
    private String name;
    private String password;
    private boolean isAmin;

    //操作
    IOperation[] iOperations = new IOperation[6];

    public abstract void StOperation(int choice);

    //抽象方法 菜单
    public abstract int menu();

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", isAmin=" + isAmin +
                '}';
    }
}
